package bud.web.boardshop.dao;

import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import bud.vo.BoardFormDTO;
import bud.vo.ReplyshopDTO;

public class ReplyshopDaoiBatis implements IReplyshopDao{

	SqlMapClientTemplate mapper;
	
	public SqlMapClientTemplate getMapper() {
		return mapper;
	}

	public void setMapper(SqlMapClientTemplate mapper) {
		this.mapper = mapper;
	}
	
	@Override
	public int insertReplyshop(ReplyshopDTO replyshop) {
		return mapper.update("Replyshop.insertReplyshop", replyshop);
	}

	@Override
	public List<ReplyshopDTO> getRshList(BoardFormDTO form) {
		return mapper.queryForList("Replyshop.selectReplyshopList",form);
	}

	@Override
	public int deleteReplyshop(ReplyshopDTO replyshop) {
		return mapper.delete("Replyshop.deleteReplyshop",replyshop);
	}

	@Override
	public int getRshCount(Integer rsh_ref_key) {
		return (Integer) mapper.queryForObject("Replyshop.getRshCount",rsh_ref_key);
	}

}
